#!/usr/bin/env bash
set -e

CLUSTER_DIR="$1"
FEATURE_DIR="$2"
DISABLE_HYBRID_FALLBACK="$3"

HYBRID_FLAG=""
if [ "$DISABLE_HYBRID_FALLBACK" = "true" ]; then
  HYBRID_FLAG="--disable_hybrid_fallback"
fi

python analyze_cluster_solver_correlation.py --cluster_dir "$CLUSTER_DIR" --db meta.db --solver_csv ../sc2022-detailed-results/anni-seq.csv --track "anni_2022" --out_dir ../satcomp2022-scope-analysis-anni --feature_dir "$FEATURE_DIR" $HYBRID_FLAG
python analyze_cluster_solver_correlation.py --cluster_dir "$CLUSTER_DIR" --db meta.db --solver_csv ../sc2022-detailed-results/main-seq.csv --track "main_2022" --out_dir ../satcomp2022-scope-analysis --feature_dir "$FEATURE_DIR" $HYBRID_FLAG
python analyze_cluster_solver_correlation.py --cluster_dir "$CLUSTER_DIR" --db meta.db --solver_csv ../sc2023-detailed-results/results_main_detailed.csv --track "main_2023" --out_dir ../satcomp2023-scope-analysis --feature_dir "$FEATURE_DIR" $HYBRID_FLAG
python analyze_cluster_solver_correlation.py --cluster_dir "$CLUSTER_DIR" --db meta.db --solver_csv ../sc2024-detailed_results/detailed_main.csv --track "main_2024" --out_dir ../satcomp2024-scope-analysis --feature_dir "$FEATURE_DIR" $HYBRID_FLAG
column -t -s, ../satcomp2022-scope-analysis-anni/solver_ranking_per_cluster.csv
column -t -s, ../satcomp2022-scope-analysis/solver_ranking_per_cluster.csv
column -t -s, ../satcomp2023-scope-analysis/solver_ranking_per_cluster.csv
column -t -s, ../satcomp2024-scope-analysis/solver_ranking_per_cluster.csv

